import time

from my_celery.main import app
from cache import redis_cli
from config import REDIS_MSG_CODE_KEY

# @app.task
def send_code(phone):
    # 生成code
    code = b'3465235'
    time.sleep(10)

    # 发送用联运

    # 写入redis
    redis_cli.setex(REDIS_MSG_CODE_KEY + phone, time=120, value=code)
